﻿namespace MelodysDemo.Core.Models
{
    /// <summary>
    /// 用户信息表
    /// </summary>
    [Table("survey_user")]
    [Index("Phone", Name = "uk_phone")]
    public partial class SurveyUser
    {
        /// <summary>
        /// 自增主键
        /// </summary>
        [Key]
        [Column("id")]
        public long Id { get; set; }
        /// <summary>
        /// 用户名称
        /// </summary>
        [Required]
        [Column("username")]
        [StringLength(64)]
        public string Username { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        [Required]
        [Column("password")]
        [StringLength(64)]
        public string Password { get; set; }
        /// <summary>
        /// 手机号
        /// </summary>
        [Required]
        [Column("phone")]
        [StringLength(11)]
        public string Phone { get; set; }
        /// <summary>
        /// 用户类型（2：管理员，1：普通用户）
        /// </summary>
        [Column("user_type")]
        public byte UserType { get; set; }
        /// <summary>
        /// 状态（1：启用，0：不启用）
        /// </summary>
        [Column("status")]
        public byte Status { get; set; }
        /// <summary>
        /// 版本号
        /// </summary>
        [Column("version")]
        public long Version { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        [Column("create_time")]
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        [Required]
        [Column("creator")]
        [StringLength(64)]
        public string Creator { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        [Column("modified_time")]
        public DateTime ModifiedTime { get; set; }
        /// <summary>
        /// 修改人
        /// </summary>
        [Required]
        [Column("modifier")]
        [StringLength(64)]
        public string Modifier { get; set; }
        /// <summary>
        /// 是否删除，0：否，1：是
        /// </summary>
        [Column("is_delete")]
        public byte IsDelete { get; set; }
    }
}